##open packages
#load libraries
library(ggplot2)
library(raster)
library(sf)
library(exactextractr)
library(prism)
library(Rcpp)
library(data.table)
library(tidyverse)
library(Hmisc)
library(haven)
library(stargazer)
library(purrr)
library(tidyr)
library(lwgeom)
library(collapse)
library(ggthemes)
library(scales)
library(tigris)
options(tigris_use_cache = TRUE)
library(mapview)
options(scipen=999)
library(stringr)
library(data.table)
library(lubridate)
library(units)
library(geosphere)
library(sp)
library(nngeo)
setwd("C:/Users/16308/OneDrive - Montana State University/UW_Madison/Water quality/Data/Rivers_Streams/Raw/USA_Rivers_and_Streams")
rivers<-st_read("USA_Rivers_and_Streams.shp")
